package com.linjuke.water.core.dal.ibatis;

import com.linjuke.water.common.domains.BaseUserDO;
import com.linjuke.water.core.dal.datainterface.BaseUserDAO;

public class BaseUserDAOIbatis extends BaseIbatisDAO implements BaseUserDAO {

	@Override
	public long create(BaseUserDO baseUserDO) {
		return (Long)this.getSqlMapClientTemplate().insert("BaseUserDAO.create", baseUserDO);
	}

	@Override
	public void delete(long id) {
		this.getSqlMapClientTemplate().update("BaseUserDAO.delete", id);
	}

	@Override
	public BaseUserDO queryById(long id) {
		return (BaseUserDO)this.getSqlMapClientTemplate().queryForObject("BaseUserDAO.queryById", id);
	}

	@Override
	public BaseUserDO queryBySsid(String ssid) {
		return (BaseUserDO)this.getSqlMapClientTemplate().queryForObject("BaseUserDAO.queryBySsid", ssid);
	}

	@Override
	public void update(BaseUserDO baseUserDO) {
		this.getSqlMapClientTemplate().update("BaseUserDAO.update", baseUserDO);
	}

}
